/*
 * @Author: lilin_:）
 * @version: 1.0
 * @Descripttion: 公共图片上传地址
 * @Date: 2021-07-06 14:10:42
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-03-02 14:52:26
 */

import request from '/@/utils/request';

export const pictureUploading = 'https://peixunadmin.chongxingsheng.com/hd/console/manager/image/imageUpload'



/**
 * @Author: lilin_:）
 * @name: 拿到内部页面菜单
 * @Descripttion: 
 * @param {object} data
 * @return {*}
 */
export let axios_menuList = () => {
	return request({
		url: '/applets/carousel/menuList',
		method: 'get'
	});
}

// 获取通讯录
export let axios_SelList = (params: any) => {
	return request({
		url: '/contacts/selList',
		method: 'get',
		params
	});
}


// 由于权限问题通讯录列表更换接口
export let axios_addressBook = (params: any) => {
	return request({
		url: '/contacts/selListTop',
		method: 'get',
		params
	});
}


// 查询付款明细所有单位
export let axios_SelListAll = (params?: any) => {
	return request({
		url: '/contacts/selListPay',
		method: 'get',
		params
	});
}



// 所有接口放在此处

/**
 * @Author: lilin_:）
 * @name: 付款明细列表
 * @Descripttion: 
 * @param {*}
 * @return {*}
 */
export let axios_paymentselList = (params: any) => {
	return request({
		url: '/payment/selList',
		method: 'get',
		params
	});
}



// 付款明细删除

export let axios_deletepaymentDetail = (data: any) => {
	return request({
		url: '/payment/del',
		method: 'post',
		data
	});
}


// 修改付款明细
export let axios_deletepaymentup = (data: any) => {
	return request({
		url: '/payment/up',
		method: 'post',
		data
	});
}


// 新增付款明细
export let axios_Addepayment = (data: any) => {
	return request({
		url: '/payment/add',
		method: 'post',
		data
	});
}


// -----------借款明细
// 借款明细列表
export let axios_loanselList = (params: any) => {
	return request({
		url: '/loan/selList',
		method: 'get',
		params
	});
}

//借款明细新增
export let axios_loanadd = (data: any) => {
	return request({
		url: '/loan/add',
		method: 'post',
		data
	});
}


/**
 * @Author: lilin_:）
 * @name: 借款明细修改
 * @Descripttion: 
 * @param {any} data
 * @return {*}
 */
export let axios_loanup = (data: any) => {
	return request({
		url: '/loan/up',
		method: 'post',
		data
	});
}

// 借款明细删除
export let axios_loandel = (data: any) => {
	return request({
		url: '/loan/del',
		method: 'post',
		data
	});
}

// 计算应计利息
export let axios_selValue_interest = (params: any) => {
	return request({
		url: '/loan/selValue_interest',
		method: 'get',
		params
	});
}

// 计算实付利息
export let axios_selValue_paidInterest = (params: any) => {
	return request({
		url: '/loan/selValue_paidInterest',
		method: 'get',
		params
	});
}
// 新加字段并且计算余额
export let axios_selValueBalance = (params: any) => {
	return request({
		url: 'loan/selValueBalance',
		method: 'get',
		params
	});
}
// 获取合同下拉
export let axios_selListTop = (params: any) => {
	return request({
		url: 'contract/selListTop',
		method: 'get',
		params
	});
}



// 商票台账列表获取

export let axios_ticketselList = (data: any) => {
	return request({
		url: '/ticket/selList',
		method: 'post',
		params: data
	});
}




// 商品台账删除
export let axios_ticketdel = (data: any) => {
	return request({
		url: '/ticket/del',
		method: 'post',
		data
	});
}

// 查询付款方式
export let axios_wayselList = () => {
	return request({
		url: '/way/selList',
		method: 'get',
	});
}

// 编辑商票台账
export let axios_ticketup = (data: any) => {
	return request({
		url: '/ticket/up',
		method: 'post',
		data
	});
}
// 新增商票台账

export let axios_ticketadd = (data: any) => {
	return request({
		url: '/ticket/add',
		method: 'post',
		data
	});
}

// 商票台账付出方式删除
export let axios_waydel = (data: any) => {
	return request({
		url: '/way/del',
		method: 'post',
		data
	});
}

// 付出方式新增
export let axios_wayadd = (data: any) => {
	return request({
		url: '/way/add',
		method: 'post',
		data
	});
}

// 付出方式编辑
export let axios_wayup = (data: any) => {
	return request({
		url: '/way/up',
		method: 'post',
		data
	});
}




// ------------合同台账

// 查询所有项目
export let axios_contractselListTop = () => {
	return request({
		url: '/contract/selListTop',
		method: 'get',

	});
}


// 合同台账列表
export let axios_contractselList = (data: any) => {
	return request({
		url: '/contract/selList',
		method: 'post',
		params: data
	});
}

// 合同台账删除
export let axios_contractdel = (data: any) => {
	return request({
		url: '/contract/del',
		method: 'post',
		data
	});
}

//合同台账新增
export let axios_contractadd = (data: any) => {
	return request({
		url: '/contract/add',
		method: 'post',
		data
	});
}

//合同台账编辑
export let axios_contractup = (data: any) => {
	return request({
		url: '/contract/up',
		method: 'post',
		data
	});
}




// 合同台账编辑




// 合同台账弹窗--------------







// 收款明细模块
export let axios_receivablesselList = (data: any) => {
	return request({
		url: '/receivables/selList',
		method: 'post',
		params: data
	});
}


// 获取工程类别
export let axios_categoryselList = (params: any) => {
	return request({
		url: '/category/selList',
		method: 'get',
		params
	});
}


/**
 * @Author: lilin_:）
 * @name: 删除工程
 * @Descripttion: 
 * @param {any} data
 * @return {*}
 */
export let axios_categoryse_delete = (data: any) => {
	return request({
		url: '/category/del',
		method: 'post',
		data
	});
}

/**
 * @Author: lilin_:）
 * @name: 工程类别新增
 * @Descripttion: 
 * @param {any} data
 * @return {*}
 */
export let axios_categoryse_add = (data: any) => {
	return request({
		url: '/category/add',
		method: 'post',
		data
	});
}


/**
 * @Author: lilin_:）
 * @name: 工程类别编辑
 * @Descripttion: 
 * @param {any} data
 * @return {*}
 */
export let axios_categoryse_up = (data: any) => {
	return request({
		url: '/category/up',
		method: 'post',
		data
	});
}








// 计算计算合同金额小计
export let axios_selValue_contractSubtotal = (params: any) => {
	return request({
		url: '/contract/selValue_contractSubtotal',
		method: 'get',
		params
	});
}


// // 合作方ID和
// export let axios_contactsselList = (params:any) => {
// 	return request({
// 		url: '/contacts/selList',
// 		method: 'get',
// 		params
// 	});
// }


// 提成明细表-------------------


// 获取列表提成明细表
export let axios_commissionselList = (params: any) => {
	return request({
		url: '/commission/selList',
		method: 'post',
		params
	});
}

// 修改提成明细表
export let axios_commissionselup = (data: any) => {
	return request({
		url: '/commission/up',
		method: 'post',
		data
	});
}


// 删除提成明细表
export let axios_commissionseldel = (data: any) => {
	return request({
		url: '/commission/del',
		method: 'post',
		data
	});
}

// 提成明细计传入到款金额 获取第一第二提成额
export let axios_selValue_fs = (params: any) => {
	return request({
		url: '/commission/selValue_fs',
		method: 'get',
		params
	});
}


// 提成明细计算发票余额
export let axios_selValue_balance = (params: any) => {
	return request({
		url: '/commission/selValue_balance',
		method: 'get',
		params
	});
}



// 通过单位查询项目
export let axios_selListByContractUnitId = (params: any) => {
	return request({
		url: '/contract/selListByContractUnitId',
		method: 'get',
		params
	});
}

// 用户管理列表--------------

export let axios_userlList = () => {
	return request({
		url: '/user/selList',
		method: 'get',
	});
}

// 用户添加
export let axios_useradd = (data: any) => {
	return request({
		url: '/user/add',
		method: 'post',
		data
	});
}

// 删除用户
export let axios_userdel = (data: any) => {
	return request({
		url: '/user/del',
		method: 'post',
		data
	});
}

// 修改用户
export let axios_userup = (data: any) => {
	return request({
		url: '/user/up',
		method: 'post',
		data
	});
}

// 获取备份
export let axios_datasel = () => {
	return request({
		url: '/data/sel',
		method: 'get',
	});
}
// 还原
export let axios_datareduction = (params: any) => {
	return request({
		url: '/data/reduction',
		method: 'get',
		params
	});
}
// 备份
export let axios_databackup = () => {
	return request({
		url: '/data/backup',
		method: 'get',
	});
}


//删除
export let axios_datadel = (data: any) => {
	return request({
		url: '/data/del',
		method: 'post',
		data
	});
}



// 退出登陆
export let axios_logout = (params: any) => {
	return request({
		url: '/toLogout',
		method: 'get',
		params
	});
}

// 统一上传文件


export let axios_fileupload = (data: any, params: any) => {
	return request({
		url: '/file/upload',
		method: 'post',
		data: data,
		params: params
	});
}

// 上传发票台账
export let axios_excelbill = (data: any, params: any) => {
	return request({
		url: 'excel/bill',
		method: 'post',
		data: data,
		params: params
	});
}


// 上传通讯录
export let axios_excelcontacts = (data: any, params: any) => {
	return request({
		url: 'excel/contacts',
		method: 'post',
		data: data,
		params: params
	});
}


// 上传合同台账
export let axios_excelcontract = (data: any, params: any) => {
	return request({
		url: 'excel/contract',
		method: 'post',
		data: data,
		params: params
	});
}


// 上传出纳
export let axios_excelcashier = (data: any, params: any) => {
	return request({
		url: 'excel/cashier',
		method: 'post',
		data: data,
		params: params
	});
}





// export let downloadURL = 'http://localhost:7777'

// export let downloadURL = 'http://s0.z100.vip:21957'


// 统一下载文件

// 获取文件上传列表
export function axiosGetFileList(params?: any) {
	return request({
		url: 'file/query',
		method: 'get',
		params
	});
}


export function axiosGetFiledel(params?: any) {
	return request({
		url: 'file/del',
		method: 'get',
		params
	});
}


// 新增付款方式--弹窗api
// 获取付款列表
export function axios_payList() {
	return request({
		url: '/pay/selList',
		method: 'get',
	});
}

// 新增付款类型
export function axios_payadd(data: object) {
	return request({
		url: '/pay/add',
		method: 'post',
		data
	});
}
// 编辑付款类型
export function axios_payup(data: object) {
	return request({
		url: '/pay/up',
		method: 'post',
		data
	});
}



// 删除付款类型
export function axios_paydel(data: object) {
	return request({
		url: '/pay/del',
		method: 'post',
		data
	});
}



// 计算扣款小记
export function axios_calculate_add(params: object) {
	return request({
		url: '/calculate/add',
		method: 'get',
		params
	});
}


/**
 * @Autor: lilin_:）
 * @description: 计算管理费
 * @param {object} params
 * @return {*}
 */
export function axios_selValue_management(params: object) {
	return request({
		url: 'payment/selValue_management',
		method: 'get',
		params
	});
}


/**
 * @Autor: lilin_:）
 * @description: 计算所得税收
 * @param {object} params
 * @return {*}
 */
export function axios_selValue_Tax(params: object) {
	return request({
		url: 'payment/selValue_Tax',
		method: 'get',
		params
	});
}



/**
 * @Autor: lilin_:）
 * @description: 计算应付款
 * @param {object} params
 * @return {*}
 */
export function axios_selValue_payable(params: object) {
	return request({
		url: 'payment/selValue_payable',
		method: 'get',
		params
	});
}




// 新增利率弹窗

// 利率列表
export function axios_taxList() {
	return request({
		url: '/tax/selList',
		method: 'get',
	});
}

// 新增
export function axios_taxadd(data: object) {
	return request({
		url: '/tax/add',
		method: 'post',
		data
	});
}
// 编辑
export function axios_taxup(data: object) {
	return request({
		url: '/tax/up',
		method: 'post',
		data
	});
}



// 删除
export function axios_taxdel(data: object) {
	return request({
		url: '/tax/del',
		method: 'post',
		data
	});
}


// payment/saveTxt  POST  int contractId项目ID string text备忘录

export function axios_saveTxt(data: object, params: any) {
	return request({
		url: `payment/saveTxt`,
		method: 'post',
		data,
		params
	});
}


// 用户模块新增角色添加弹窗内容



/**
 * @Autor: lilin_:）
 * @description: 获取角色列表弹窗
 * @param {*}
 * @return {*}
 */
export function axios_roleselList() {
	return request({
		url: `role/selList`,
		method: 'get',
	});
}



/**
 * @Autor: lilin_:）
 * @description: 角色新增
 * @param {any} data
 * @return {*}
 */
export function axios_roleAdd(data: any) {
	return request({
		url: `role/add `,
		method: 'post',
		data
	});
}

/**
 * @Autor: lilin_:）
 * @description: 角色编辑
 * @param {any} data
 * @return {*}
 */
export function axios_roleup(data: any) {
	return request({
		url: `role/up `,
		method: 'post',
		data
	});
}


/**
 * @Autor: lilin_:）
 * @description: 删除接口
 * @param {any} data
 * @return {*}
 */
export function axios_roledel(data: any) {
	return request({
		url: `role/del  `,
		method: 'post',
		data
	});
}




/**
 * @Autor: lilin_:）
 * @description: 提成明细
 * @param {any} data
 * @return {*}
 */
export function axios_commissionadd(data: any) {
	return request({
		url: `commission/add`,
		method: 'post',
		data
	});
}